import router from "../../../apis/routers";

const key = getFilePathStore(import.meta.url);

export const useReportStore = defineStore(key, {
    state: () => ({
        coreBaseNavightionStore: useCoreBaseNavightionStore(),
        headerTitle: '九型人格测评报告',
        msgTitle: "对于本次测评，我们专门制作了九型人格测评报告，包括:优势人格深度解剖、九型人格测评分析、职业规划建议、人格剖面完全解析等详细内容。我们有两种方式解锁本报告。",
        dividerTitle1: '主人格',
        dividerTitle2: '次人格',
        dividerTitle3: '辅人格',
        dividerTitle1Msg: '核心人格特质分析',
        colTitleContext: "职业匹配建议",
        colTitleType: "人格类型",
        colTitleTypeContext: 'default type context',
    }),
    actions: {
        async initStore() {
            this.coreBaseNavightionStore.initStore().then(async (res) => {
                await res.setTitle('查看报告');
                await res.setHaveLeftIcon(false);
                await res.setHaveRightIcon(false);
            });
        },
        async getSaveExport() {
            console.log('保存报告');
        },
        async getGoBack() {
            router.push({ name: 'home' });
        }
    },
    persist: {
        key: key,
        storage: sessionStorage,
    }
})